package com.trkj.property_controller;

import com.trkj.entity.CostEntity;
import com.trkj.service.CostService;
import com.trkj.vo.AjaxResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
@CrossOrigin
public class CostController {
    @Resource
    private CostService costService;
    @PostMapping("/findBillingltems")
    public AjaxResponse findBillingltems(@RequestBody CostEntity costEntity){
        return AjaxResponse.success(costService.findBillingltems(costEntity));
    }
    @PostMapping("/AddBillingltems")
    public AjaxResponse AddBillingltems(@RequestBody CostEntity costEntity){
        return AjaxResponse.success(costService.AddBillingltems(costEntity));
    }
    @PostMapping("/findCost")
    public AjaxResponse findCost(){
        return AjaxResponse.success(costService.findCost());
    }
    @PostMapping("/addFwfyconnect")
    public AjaxResponse addFwfyconnect(@RequestBody CostEntity costEntity){
        return AjaxResponse.success(costService.addFwfyconnect(costEntity));
    }
    @PostMapping("/CostTongJi")
    public AjaxResponse CostTongJi(){
        return AjaxResponse.success(costService.CostTongJi());
    }
}
